//      core.h
//      


#ifndef CORE_H
#define CORE_H

#include <QVector>

class Core
{
	public:
		Core(QVector<qreal> &prodactionCosts, QVector<qreal> &storageExpenses);
		QVector<quint16> calculate();
		void getSecondStepValues(QVector<qreal>* mass,
															QVector<qreal>* w2,
															QVector<quint32>* s2,
															QVector<quint32>* u2);
		QVector<qreal> getLastStepValues();
		void getFirstStepValues(QVector<qreal>* mass,
														qreal* w1,
														quint32* s1,
														quint32* u1);
		QVector<quint32> getProdactLine() const;
		qreal getTotalExpenses() const;
			
	private:
		qreal W3[4];
		qreal W2[3];
		quint32 S2[3];
		quint32 U2[3];
		qreal MASS[3][4];
		qreal MASS1[3];
		qreal W1;
		quint32 S1;
		quint32 U1;
		quint32 num;
		QVector<qreal> prodactionCosts;
		QVector<qreal> storageExpenses;
		quint16 lastSaveProd;
		void preCalculate();
};

#endif /* CORE_H */ 
